package com.hello.pet.job;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * XXLJob演示类
 */

@Slf4j
@Component
public class XXLJobDemo {

    @XxlJob("XXLJobDemo")
    public ReturnT<String> xxlJobDemo(String s) {
        try {
            //业务逻辑
            System.out.println("进来啦!!!");
        } catch (Exception ex) {
            log.error("JobDemo执行器运行异常:{}", ex);
            throw ex;
        }
        log.info("JobDemo执行器运行成功!");
        return ReturnT.SUCCESS;
    }
}
